﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;


namespace WaterRevenueMS.Domain.ViewModels.BasicSet.CompanySet
{
    public class CompanySetModel : EntityCommon
    {
        public CompanySetModel()
        {
            BankSetItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 银行信息 ---", Value = "0"}, 
                };
            Search = new SearchModel();
            {
               
            };
        }

        public int Id { get; set; }


        [Display(Name = "银行信息")]
        public string  BankSetName { get; set; }
        public List<SelectListItem> BankSetItems { get; set; }

        [Display(Name = "开户银行")]
        public int? Yin_HSZ_No { get; set; }

        [Display(Name = "公司标识")]
        public string Gong_SBZ { get; set; }

        [Display(Name = "单位名称")]
        public string Dan_WMC { get; set; }

        [Display(Name = "单位简称")]
        public string Dan_WJC { get; set; }
        [Display(Name = "单位名称E")]
        public string Dan_WMCE { get; set; }

        [Display(Name = "单位地址")]
        public string Dan_WDZ { get; set; }

        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        [Display(Name = "电话")]
        public string Dian_H { get; set; }
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        [Display(Name = "传真")]
        public string Chuan_Z { get; set; }
        [Display(Name = "负责人")]
        public string Fu_ZR { get; set; }

        [Display(Name = "联系人")]
        public string Lian_XR { get; set; }
        [Display(Name = "邮政编码")]
        public string You_ZBM { get; set; }

        [Display(Name = "企业主页")]
        public string Qi_YZY { get; set; }
        [Display(Name = "企业邮箱")]
        public string Qi_YYX { get; set; }
        [Display(Name = "银行账号")]
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        public string Yin_HZH { get; set; }

        [Display(Name = "税号")]
        public string Shui_H { get; set; }

        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }

        public SearchModel Search { get; set; }
    }
    public class SearchModel
    {
        public SearchModel()
        {
            BankSetItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 银行信息 ---", Value = "0"}, 
                };
        }


        [Display(Name = "银行信息")]
        public string BankSetName { get; set; }

        public List<SelectListItem> BankSetItems { get; set; }

        [Display(Name = "开户银行")]
        public int Yin_HSZ_No { get; set; }

        [Display(Name = "公司标识")]
        public string Gong_SBZ { get; set; }

        [Display(Name = "单位名称")]
        public string Dan_WMC { get; set; }

        [Display(Name = "单位简称")]
        public string Dan_WJC { get; set; }
        [Display(Name = "单位名称E")]
        public string Dan_WMCE { get; set; }

        [Display(Name = "单位地址")]
        public string Dan_WDZ { get; set; }
        [Display(Name = "电话")]
        public string Dian_H { get; set; }

        [Display(Name = "传真")]
        public string Chuan_Z { get; set; }
        [Display(Name = "负责人")]
        public string Fu_ZR { get; set; }

        [Display(Name = "联系人")]
        public string Lian_XR { get; set; }
        [Display(Name = "邮政编码")]
        public string You_ZBM { get; set; }

        [Display(Name = "企业主页")]
        public string Qi_YZY { get; set; }
        [Display(Name = "企业邮箱")]
        public string Qi_YYX { get; set; }
        [Display(Name = "银行账号")]
        public string Yin_HZH { get; set; }

        [Display(Name = "税号")]
        public string Shui_H { get; set; }

        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }
    }
   
}
